<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Departments_CMS.aspx.vb" Inherits="Secure_Departments_CMS" %>

<%@ Register Src="../Header.ascx" TagName="Header" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Seminole County Youth Commission</title>
    <link rel="stylesheet" type="text/css" href="../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../css/hmenu.css" />

    <link rel="stylesheet" type="text/css" href="../css/contact.css" />
</head>
<body>
    <form id="form1" runat="server">
        <table width="770" border="1" align="center" cellpadding="0" cellspacing="0" style="background-color: #666666;
            height: 100%;">
            <tr>
                <td>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <img src="../images/header.jpg" width="770" height="135" alt="" /></td>
                        </tr>
                        <tr>
                            <td style="background-color: #B32C24">
                                <div class="horizontalcssmenu">
                                    <ul id="cssmenu1">
                                    <asp:Label ID="pageNavigationLabel" runat="server"></asp:Label>
                                    </ul>                     
                                </div>
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color: #FFFFFF;
                        height: 739;">
                        <tr>
                            <td valign="top" style="width: 65px; height: 26px;">
                            </td>
                            <td valign="top" style="width: 346px; height: 26px;">
                                <asp:Label ID="Label1" runat="server" ForeColor="White" Text="Insert Complete"></asp:Label></td>
                            <td valign="top" style="width: 65px; height: 26px;">
                                <uc1:Header ID="Header1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td height="109" valign="top" style="width: 65px"></td>
                            <td height="109" valign="top" style="width: 346px">
                                Name<br />
                                <asp:TextBox ID="Name" runat="server"></asp:TextBox><br />
                                Identity&nbsp;<br />
                                <asp:TextBox ID="Identity" runat="server"></asp:TextBox><br />
                                Is Active<br />
                                <asp:CheckBox ID="isActive" runat="server" /><asp:Button ID="Button1" runat="server" Text="Insert!" /><br />
                                <br />
                            </td>
                            <td height="109" valign="top" style="width: 65px"></td>
                        </tr>
                        <tr>
                            <td height="361" style="width: 65px">
                            </td>
                            <td valign="top" style="width: 346px; text-align: center;">

                                <fieldset style="width: 99%; height: 32px; left: 0px; top: 0px;">
                                    <legend>Departments</legend>
                                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                                        AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display.">
                                        <Columns>
                                            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                                            <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
                                            <asp:BoundField DataField="dbname" HeaderText="dbname" SortExpression="dbname" FooterText="agagewgegs" />
                                            <asp:BoundField DataField="dbidentity" HeaderText="dbidentity" SortExpression="dbidentity" />
                                            <asp:CheckBoxField DataField="Active" HeaderText="Active" SortExpression="Active" />
                                        </Columns>
                                    </asp:GridView>
                                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CET_4584ConnectionString1 %>"
                                        DeleteCommand="DELETE FROM [departments] WHERE [ID] = @ID" InsertCommand="INSERT INTO [departments] ([dbname], [dbidentity], [Active]) VALUES (@dbname, @dbidentity, @Active)"
                                        ProviderName="<%$ ConnectionStrings:CET_4584ConnectionString1.ProviderName %>"
                                        SelectCommand="SELECT [ID], [dbname], [dbidentity], [Active] FROM [departments]"
                                        UpdateCommand="UPDATE [departments] SET [dbname] = @dbname, [dbidentity] = @dbidentity, [Active] = @Active WHERE [ID] = @ID">
                                        <InsertParameters>
                                            <asp:Parameter Name="dbname" Type="String" />
                                            <asp:Parameter Name="dbidentity" Type="Int32" />
                                            <asp:Parameter Name="Active" Type="Boolean" />
                                        </InsertParameters>
                                        <UpdateParameters>
                                            <asp:Parameter Name="dbname" Type="String" />
                                            <asp:Parameter Name="dbidentity" Type="Int32" />
                                            <asp:Parameter Name="Active" Type="Boolean" />
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </UpdateParameters>
                                        <DeleteParameters>
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </DeleteParameters>
                                    </asp:SqlDataSource>
                                    &nbsp; &nbsp;&nbsp;
                                </fieldset>
                            </td>
                            <td height="361" style="width: 65px">
                                </td>
                        </tr>
                        <tr>
                            <td height="109" valign="top" style="width: 65px">
                            </td>
                            <td height="109" valign="top" style="width: 346px">
                            </td>
                        </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #FFFFFF">
                        <tr align="center">
                            <td>
                                &copy; 2007 Seminole County Youth Commission</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

